#ifndef CWORKER_MAIN_H_
#define CWORKER_MAIN_H_

#include "wtk/os/wtk_log.h"
#include "wtk/core/cfg/wtk_main_cfg.h"
#include "wtk/core/cfg/wtk_local_cfg.h"
#include "wtk/os/wtk_log.h"

#include "cworker_cfg.h"
#include "redis/cworker_redis.h"
#include "script/cworker_exec.h"
#include "hiredis.h"

#ifdef __cplusplus
extern "C" {
#endif

extern wtk_log_t *g_log;

#define log_i(fmt,...) (g_log ? wtk_log_printf(g_log,__FUNCTION__,__LINE__,LOG_NOTICE,fmt,__VA_ARGS__) : 0)
#define log_i0(fmt) wtk_log_printf(g_log,__FUNCTION__,__LINE__,LOG_NOTICE,fmt)
#define log_w(fmt,...) wtk_log_printf(g_log,__FUNCTION__,__LINE__,LOG_WARN,fmt,__VA_ARGS__)
#define log_w0(fmt) wtk_log_printf(g_log,__FUNCTION__,__LINE__,LOG_WARN,fmt)
#define log_e(fmt,...) wtk_log_printf(g_log,__FUNCTION__,__LINE__,LOG_ERR,fmt,__VA_ARGS__)
#define log_e0(fmt) wtk_log_printf(g_log,__FUNCTION__,__LINE__,LOG_ERR,fmt)


#ifdef __cplusplus
};
#endif
#endif
